package com.tom.demo.service.product.impl;

import com.tom.demo.common.entity.AttributeCategory;
import com.tom.demo.common.response.Result;
import com.tom.demo.mapper.AttributeCategoryMapper;
import com.tom.demo.service.product.AttributeService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Slf4j
@Service
public class AttributeServiceImpl implements AttributeService {

    @Resource
    private AttributeCategoryMapper attributeCategoryMapper;

    @Override
    public Result parentId(String parentId) {
        List<AttributeCategory> attributeCategoryList = attributeCategoryMapper.findByParentId(parentId);
        return Result.success(attributeCategoryList);
    }
}
